-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added timestamp support #1884
base: SNOW-873466-arrow-batches
Are you sure you want to change the base?
Added timestamp support #1884
Conversation
…e-types # Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/SimpleArrowFullVectorConverter.java
private ValueVector vector; | ||
private DataConversionContext context; | ||
private TimeZone timeZoneToUse; | ||
private boolean isNTZ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it would be better to have a boolean switched - isTZ
. It seems that it would be more user-friendly as the timeZoneToUse is just next to the bool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isNTZ
is used to distinguish between LTZ and NTZ cases - isTZ
would be more confusing here I think. I'd go with just adding some comments here to clarify what these mean
vector.allocateNew(length); | ||
vector.setValueCount(length); | ||
for (int i = 0; i < length; i++) { | ||
vector.set(i, 1440); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about defining the const for TZ offset?
offsets.set( | ||
i, | ||
1440 | ||
+ timeZone.getOffset(seconds.get(i) * 1000 + fractions.get(i) / 1000000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we define & use consts for these calculations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, forgot to do that after initial testing
…e-types # Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/ArrowFullVectorConverter.java # src/main/java/net/snowflake/client/jdbc/ArrowResultChunk.java
…stamps # Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/ArrowFullVectorConverter.java
Overview
Added tmestamp support
Pre-review self checklist
mvn -P check-style validate
)mvn verify
and inspecttarget/japicmp/japicmp.html
)SNOW-XXXX: